package com.rongshe.system.mapper;

import com.rongshe.system.domain.SysMessageReceiver;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysMessageReceiverMapper {

    /**
     * 批量新增消息接收记录
     */
    int batchInsert(List<SysMessageReceiver> receivers);

    /**
     * 获取未读消息数量
     */
    int selectUnreadCount(@Param("userId") Long userId);

    /**
     * 更新消息读取状态
     */
    int updateReadStatus(@Param("userId") Long userId, @Param("messageIds") Long[] messageId);

    /**
     * 批量更新消息读取状态
     */
    int batchUpdateReadStatus(@Param("userId") Long userId);
}
